from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from cemberus.categories.models import Category


class CategoryAdmin(admin.ModelAdmin):
    prepopulated_fields = {'slug': ('name',)}
    fieldsets = [
        (None, {'fields': ['user', 'name', 'slug', 'description', 'created', 'modified',]}),
        (_(u'HTML-Meta Angaben'), {'fields': ['html_title', 'html_description', 'html_keywords',]}),
    ]
    list_display = ('name', 'description',)
    search_fields = ['name',]
    list_filter = ('user',)
    
admin.site.register(Category, CategoryAdmin)

